package io.renren.modules.mybog.fromControoler;





import io.renren.modules.mybog.entity.UserEntityS;
import io.renren.modules.mybog.fromControoler.utiles.R;
import io.renren.modules.mybog.service.UserServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 小🌤
 * @since 2021-03-16
 */
@RestController
@RequestMapping("/bolg/user")
public class UserControllers {
     @Autowired
    private UserServices userService;

     @GetMapping("/list")
     public R list(){
         List<UserEntityS> list = userService.list();
         UserEntityS user = list.get(0);
         return R.ok().data("user",user);
     }
}

